package com.mde.mapspathfinder.activ;

import com.mde.yandexmaptrial.R;

import com.google.android.gms.maps.*;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;

import android.os.Bundle;


public class GoogleMapActivity extends MapActivity {
	
	private static final int GPS_ERRORDIALOG_REQUEST = 9001;
	MapController map;
	
	SupportMapFragment mapFrag;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.google_layout);
		
		MapView mapView = (MapView) findViewById(R.id.mapGoogle);
	    mapView.setBuiltInZoomControls(true);
	    
	    /*
		if (servicesOK()) {
			Toast.makeText(this, "Ready to map!", Toast.LENGTH_SHORT).show();
			
			setContentView(R.layout.google_layout);
		} else {
			Toast.makeText(this, "Not ready to map!", Toast.LENGTH_SHORT).show();
			setContentView(R.layout.google_layout);
		}
		*/
		
	}
/*
	public boolean servicesOK() {
		int isAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
		
		if (isAvailable == ConnectionResult.SUCCESS) {
			return true;
		}
		else if (GooglePlayServicesUtil.isUserRecoverableError(isAvailable)) {
			Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isAvailable, this, GPS_ERRORDIALOG_REQUEST);
			dialog.show();
		}
		else {
			Toast.makeText(this, "Can't connect to Google Play services", Toast.LENGTH_SHORT).show();
		}
		return false;
	}
	*/

	@Override
	public void finish() {
        map = null;
	    mapFrag = null;
	    super.finish();
	}


	@Override
	protected boolean isRouteDisplayed() {
		return false;
	}

	
}

